<template>
    <div class="list-container">
        <div class="list-title">能源应用</div>
        <div class="list-content">
            <div 
                v-for="item in appList"
                :key="item.title"
                class="card-wrapper"
            >
                <div class="card">
                    <div class="card-title">
                        <div class="card-avatar"><img :src="item.path" /></div>
                        <div class="card-text">{{  item.title }}</div>
                        <div style="margin-left:auto; "><el-icon color="#99a0ae" size="20" ><Right /></el-icon></div>
                    </div>
                    <div class="card-content">{{  item.content }}</div>
                    <div class="card-footer">
                        <div class="tag">高效节能</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
    import { watch, ref, reactive, onMounted } from 'vue';
    import { getAppTypeList, getAppList } from '@/api/global.js';
    
    const typeList = ref([]);
    const fetchTypeList = ()=>{
        getAppTypeList()
        .then(res=>{
            if ( res.data.code === 200 ) {
                typeList.value = res.data.data;
            }
        })
    }
    onMounted(()=>{
        fetchTypeList();
    })

</script>